package com.zzw.basic.classloader;

import java.sql.Date;

public class CrazyitObjectFactory {

	public static <T> T getInstance(Class<T> cls) throws Exception{
		return cls.newInstance();
	}
	
	public static void main(String[] args) {
		try {
			Date date = new Date(0);
			System.out.println(date);
			Date d = CrazyitObjectFactory.getInstance(date.getClass());
			System.out.println(d);
		} catch (Exception e) {
			e.printStackTrace();
		}
	}
}
